﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ShopTaskList.aspx.cs" Inherits="ShopTaskList" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>店铺任务列表</title>
    <script src="../js/extTools.js" type="text/javascript"></script>
    <link href="../css/ExtStyle.css" rel="stylesheet" type="text/css" />
    <script src="../js/jquery/jquery-3.2.1.min.js" type="text/javascript"></script>
    <script src="../js/plugins/jquery.raty/jquery.raty.js" type="text/javascript"></script>
    <link href="../js/plugins/jquery.raty/jquery.raty.css" rel="stylesheet" type="text/css" />
    <link href="../css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <script src="../js/bootstrap.min.js" type="text/javascript"></script>
    <script src="../js/config.js" type="text/javascript"></script>

    <link rel="stylesheet" type="text/css" href="../js/plugins/imgviewer/css/viewer.css" />
    <script type="text/javascript" src="../js/plugins/imgviewer/js/viewer.min.js"></script>

    <style type="text/css">
        
        .images-view .x-item-over{
            border: 0px solid #dddddd;
            background: #efefef;
            padding: 0px;
        }
        .images-view .x-item-selected{
            background: #eff5fb;
            border: 0px solid #99bbe8;
            padding: 0px;
        }
        /*.images-view .x-item-selected .file-panel span {
			width: 24px;
			height: 29px;
			display: inline;
			float: right;
			text-indent: -9999px;
			overflow: hidden;
			background: url(../images/selectedtrue.png) no-repeat;
			margin: 5px 1px 1px;
			cursor: pointer;
		}*/

        .albums_item_box {
			float: left;
			position: relative;
			/*width: 250px;
			height: 282px;*/
			margin: 20px 8px 0;
		}
		.albums_item_box .file-panel {
			position: absolute;
			height: 29px;
			/*background: rgba(0, 0, 0, 0.5);*/
			top: 0;
			right: 0;
			left: 0;
			overflow: hidden;
			z-index: 300;
		}

        .albums_item_box1 {
			float: left;
			position: relative;
			margin: 6px 6px 0;
		}
		.albums_item_box1 .file-panel {
			position: absolute;
			height: 29px;
			top: 0;
			right: 0;
			left: 0;
			overflow: hidden;
			z-index: 300;
		}
		/*.albums_item_box .file-panel span {
			width: 24px;
			height: 29px;
			display: inline;
			float: right;
			text-indent: -9999px;
			overflow: hidden;
			background: url(../images/selectedfalse.png) no-repeat;
			margin: 5px 1px 1px;
			cursor: pointer;
		}*/
		
		.img_box{
            position:relative;
			border: 1px solid #dedede;
			width: 320px;
			height: 260px; 
		}
        .img_box1{
            position:relative;
			border: 1px solid #dedede;
			width: 60px;
			height: 60px; 
		}
		.img-responsive {
			display: block;
			width: 100%;
			height: 100%;
		}
		.albums_item_des {
			width: 100%;
			height: 30px;
			line-height: 30px;
			overflow: hidden;
			white-space:nowrap;
			text-overflow:ellipsis;
		}
        #albums_item_list .viewer_box{
			padding: 0 10px 0 12px;
			margin: auto;
		}
        .custom_hide
        {
            display:none;
        }
        .true_span {
            width: 24px;
			height: 29px;
			display: inline;
			float: right;
			text-indent: -9999px;
			overflow: hidden;
			background: url(../images/selectedtrue.png) no-repeat;
			margin: 5px 1px 1px;
			cursor: pointer;
        }
        .false_span {
            width: 24px;
			height: 29px;
			display: inline;
			float: right;
			text-indent: -9999px;
			overflow: hidden;
			background: url(../images/selectedfalse.png) no-repeat;
			margin: 5px 1px 1px;
			cursor: pointer;
        }
        .feedback-state-0
        {
            display:none;
        }
        .finishround {
				position: absolute;
				top: 65%;
				right: 10%;
				margin: 0 3px;
				text-align: center;
				line-height: 63px;
				font-size: 14px;
				color: coral;
				/*display: inline-block;*/
				width: 65px;
				height: 65px;
				border: 1px solid coral;
				border-radius: 100%;
				transform: rotateZ(12deg);
				-moz-transform: rotate(12deg);
				-webkit-transform: rotate(12deg);
			}
        
    </style>

    <style type="text/css">
        /*.xingPing ul {
            padding-left: 0;
            overflow: hidden;
        }
        .xingPing ul li {
            float: left;
            list-style: none;
            width: 27px;
            height: 27px;
            background: url(../images/star.gif)
        }
        .xingPing ul li a {
            display: block;
            width: 100%;
            padding-top: 27px;
            overflow: hidden;
        }
        .xingPing ul li.light {
            background-position: 0 -29px;
        }*/
    </style>

    <script type="text/javascript">

        var GridPanelNew = [];
        var SelectBatchData = [];
        var btnBatchEdit_Click = function () {
            AddBatchDataList();
            addGridPanelBatch();
            App.winMain.setTitle('批量处理');
            App.winMain.show();
            TaskFinishLevel(5);
        };
        var btnClose_Click = function () {
            App.txtFeedBackDescribe1.setValue(' ');
            App.winMain.close();
            //#{winMain}.close(); 
        }

        var btnCheckAll_Click = function () {
            //App.ImageView.getSelectionModel().selectAll(); 
            SelectCheckAll();
        }
        var btnCheckCancel_Click = function () {
            //App.ImageView.getSelectionModel().deselectAll();
            SelectCheckCancel();
        }

        btnTaskBatchSave_Click = function () {
            var reqData = []; //筛选组装请求数据 
            for (var i = 0; i < GridPanelNew.length; i++)
            {
                var selData = {
                    "DetailID": GridPanelNew[i].DetailID,
                    "IsInsert": GridPanelNew[i].IsInsert,
                    "IsRead": GridPanelNew[i].IsRead,
                    "ShopID": GridPanelNew[i].ShopID
                };
                reqData.push(selData);
            }
            if (reqData.length > 0) {
                CompanyX.TaskBatchFeedbackSave({ "TaskFinishLevel": $("#cylstar1 input").val(), "BatchList": reqData }, {
                    success: function (data) {
                        if (data > 0) {
                            App.winMain.close();
                            Ext.net.Notification.show({
                                html: '保存成功',
                                title: '提示'
                            });
                        }
                        else if (data == -4) {
                            Ext.net.Notification.show({
                                html: '反馈描述不能为空',
                                title: '提示'
                            });
                        }
                        else {
                            Ext.net.Notification.show({
                                html: '保存失败',
                                title: '提示'
                            });
                        }
                    }
                });
            }
            else {
                Ext.net.Notification.show({
                    html: '店铺任务处理列表不能为空',
                    title: '提示'
                });
            }
        }

        function addGridPanelBatch()
        {
            //alert(JSON.stringify(SelectBatchData));
            GridPanelNew = SelectBatchData;
            App.GridPanelBatch.store.removeAll();
            App.GridPanelBatch.store.add(SelectBatchData);
        }
        function removeGridPanelBatch(id)
        {
            App.GridPanelBatch.store.remove(App.GridPanelBatch.store.getAt(id));
            var count = App.GridPanelBatch.store.getCount();

            //console.log(App.GridPanelBatch.store.data.items[0].data.ShopName);
            var arrData = [];
            for (var i = 0; i < count; i++)
            {
                var selData1 = {
                    "Custom_Id": i,
                    "ShopName": App.GridPanelBatch.store.data.items[i].data.ShopName,
                    "ShopID": App.GridPanelBatch.store.data.items[i].data.ShopID,
                    "TaskName": App.GridPanelBatch.store.data.items[i].data.TaskName,
                    "ProcessingDescribe": App.GridPanelBatch.store.data.items[i].data.ProcessingDescribe,
                    "TaskID": App.GridPanelBatch.store.data.items[i].data.TaskID,
                    "DetailID": App.GridPanelBatch.store.data.items[i].data.DetailID,
                    "Url": App.GridPanelBatch.store.data.items[i].data.Url,
                    "IsInsert": App.GridPanelBatch.store.data.items[i].data.IsInsert,
                    "IsRead": App.GridPanelBatch.store.data.items[i].data.IsRead
                };
                arrData.push(selData1);
            }
            GridPanelNew = arrData;

            App.GridPanelBatch.store.removeAll();
            App.GridPanelBatch.store.add(arrData);
            
        }

        var mrjShopDataID = '';
        var mrjShopDataIdlist = [];
        var IsAdd = false;
        var selectionClick = function (id,index)
        {
            mrjShopDataID = id;
            if (mrjShopDataIdlist.length == 0) {
                mrjShopDataIdlist.push(mrjShopDataID);
            }
            else {
                for (i = 0; i < mrjShopDataIdlist.length; i++) {
                    if (mrjShopDataID == mrjShopDataIdlist[i]) {
                        mrjShopDataIdlist.splice(i, 1);
                        IsAdd = false;
                        break;
                    }
                    else {
                        IsAdd = true;
                    }
                }
                if (IsAdd == true)
                {
                    mrjShopDataIdlist.push(mrjShopDataID);
                }
            }
            //console.log(mrjShopDataIdlist);
            //console.log(App.ImageView.store.data.items);
            //console.log($("#" + index + "").hasClass("false_span"));
            if ($("#" + index + "").hasClass("false_span") == true) {
                $("#" + index + "").removeClass("false_span");
                $("#" + index + "").addClass("true_span");
            }
            else {
                $("#" + index + "").removeClass("true_span");
                $("#" + index + "").addClass("false_span");
            }

        }

        var mrjShopImgID = '';
        var m_ImgIDlist = [];
        var IsImgAdd = false;
        var SelectProblemPicClick = function (id, index) {
            mrjShopImgID = id;
            if (m_ImgIDlist.length == 0) {
                m_ImgIDlist.push(mrjShopImgID);
            }
            else {
                for (i = 0; i < m_ImgIDlist.length; i++) {
                    if (mrjShopImgID == m_ImgIDlist[i]) {
                        m_ImgIDlist.splice(i, 1);
                        IsImgAdd = false;
                        break;
                    }
                    else {
                        IsImgAdd = true;
                    }
                }
                if (IsImgAdd == true) {
                    m_ImgIDlist.push(mrjShopImgID);
                }
            }
            //console.log(m_ImgIDlist);
            if ($("#" + index + "").hasClass("false_span") == true) {
                $("#" + index + "").removeClass("false_span");
                $("#" + index + "").addClass("true_span");
            }
            else {
                $("#" + index + "").removeClass("true_span");
                $("#" + index + "").addClass("false_span");
            }

        }

        function AddBatchDataList()
        {
            var dataModel = App.ImageView.store.data.items;
            SelectBatchData = [];
            var numIndex = 0;
            for (var i = 0; i < dataModel.length; i++) {
                for (var j = 0; j < mrjShopDataIdlist.length; j++) {
                    if (dataModel[i].id == mrjShopDataIdlist[j]) {
                        var selData = {
                            "Custom_Id": numIndex,
                            "ShopName": dataModel[i].data.ShopName,
                            "ShopID": dataModel[i].data.ShopID,
                            "TaskName": dataModel[i].data.TaskName,
                            "ProcessingDescribe": dataModel[i].data.ProcessingDescribe,
                            "TaskID": dataModel[i].data.TaskID,
                            "DetailID": dataModel[i].data.DetailID,
                            "Url": dataModel[i].data.Url,
                            "IsInsert": dataModel[i].data.IsInsert,
                            "IsRead": dataModel[i].data.IsRead
                        };
                        SelectBatchData.push(selData);
                        numIndex = numIndex + 1;
                    }
                }
            }
            //console.log(SelectBatchData);
        }
        function SelectCheckAll()
        {
            var dataModel = App.ImageView.store.data.items;
            mrjShopDataIdlist = [];
            for (var i = 0; i < dataModel.length; i++) {
                mrjShopDataIdlist.push(dataModel[i].id);
                var index = dataModel[i].data.ShopID + dataModel[i].data.TaskID + dataModel[i].data.DetailID
                if ($("#" + index + "").hasClass("false_span") == true) {
                    $("#" + index + "").removeClass("false_span");
                    $("#" + index + "").addClass("true_span");
                }
                else {
                    $("#" + index + "").addClass("true_span");
                }
            }
        }
        function SelectCheckCancel()
        {
            var dataModel = App.ImageView.store.data.items;
            mrjShopDataIdlist = [];
            for (var i = 0; i < dataModel.length; i++) {
                var index = dataModel[i].data.ShopID + dataModel[i].data.TaskID + dataModel[i].data.DetailID
                if ($("#" + index + "").hasClass("true_span") == true) {
                    $("#" + index + "").removeClass("true_span");
                    $("#" + index + "").addClass("false_span");
                }
                else {
                    $("#" + index + "").addClass("false_span");
                }
            }
        }

        var btnPagClick = function () {
            //alert(99);
            mrjShopDataIdlist = [];
            SelectBatchData = [];
        }

        var selectionChanged = function (selModel, selected) {

            //console.log(selModel.store.data.items);
            //console.log(selModel.data);
            //console.log(selected);
            //console.log(selected[0].data.ShopName);
            //console.log(selected[0].data);
            //App.ImageView.getSelectionModel().selectAll();
            // 第二种方法  
            //App.ImageView.select(selModel.store.data.items[2], true);

            SelectBatchData = [];
            for (var i = 0; i < selected.length; i++)
            {
                var selData = {
                    "Custom_Id": i,
                    "ShopName": selected[i].data.ShopName,
                    "ShopID": selected[i].data.ShopID,
                    "TaskName": selected[i].data.TaskName,
                    "ProcessingDescribe": selected[i].data.ProcessingDescribe,
                    "TaskID": selected[i].data.TaskID,
                    "DetailID": selected[i].data.DetailID,
                    "Url": selected[i].data.Url,
                    "IsInsert": selected[i].data.IsInsert,
                    "IsRead": selected[i].data.IsRead
                };
                SelectBatchData.push(selData);
            }
        };


        var m_DetailID = 0; //默认反馈详情id
        var m_IsInsert = true; //是否添加或修改 
        var M_ShopID = ""; //店铺编码ID
        var btnTaskDetail_Click = function (TaskID, DetailID, ShopID) {
            m_ImgIDlist = [];
            m_DetailID = DetailID;
            M_ShopID = ShopID;
            CompanyX.SelectTaskDetail({ "TaskID": TaskID, "DetailID": DetailID, "ShopID": ShopID }, {
                success: function (data) {
                    if (data.state == 0) {
                        //JSON.parse(jsonstr); 
                        //alert(JSON.stringify(data)); 
                        if (data.Problem != null && data.Problem.length > 0)
                        {
                            for (var i = 0; i < data.Problem.length; i++) {
                                m_ImgIDlist.push(data.Problem[i].ImgID);
                                if ($("#" + data.Problem[i].ImgID + "").hasClass("false_span") == true) {
                                    $("#" + data.Problem[i].ImgID + "").removeClass("false_span");
                                    $("#" + data.Problem[i].ImgID + "").addClass("true_span");
                                }
                                else {
                                    $("#" + data.Problem[i].ImgID + "").addClass("true_span");
                                }
                            }
                        }

                        if (data.task_set != null && data.task_set.length > 0) {
                            $('#txtTaskName').html(data.task_set[0].TaskName);
                            $('#txtExecWeek').html(ExecWeek(data.task_set[0].ExecWeek));
                            $('#txtTaskType').html(TaskType(data.task_set[0].TaskType));
                            $('#txtIsEnabled').html(IsEnabled(data.task_set[0].IsEnabled));
                            $('#txtTaskDescribe').html(data.task_set[0].TaskDescribe);
                        }
                        $('#txtProcessingTime1').html(data.ProcessingTime);
                        $('#txtProcessingDescribe').html(data.ProcessingDescribe);
                        if (data.task_feedback != null && data.task_feedback.length > 0) {
                            TaskFinishLevel(data.task_feedback[0].TaskFinishLevel);
                            m_IsInsert = false;
                        }
                        else {
                            TaskFinishLevel(1);
                            m_IsInsert = true;
                        }
                        ImageMax();
                    }
                }
            });
            App.taskDetailMain.setTitle('任务完成详情');
            App.taskDetailMain.show();

        }

        var btnTaskDetailSave_Click = function () {
            //alert(99);
            //var num = 0; 
            CompanyX.TaskFeedbackSave({ "IsInsert": m_IsInsert, "DetailID": m_DetailID, "TaskFinishLevel": $("#cylstar2 input").val(), "ShopID": M_ShopID, "ImgIDlist": m_ImgIDlist }, {
                success: function (data) {
                    if (data > 0) {
                        App.taskDetailMain.close();
                        Ext.net.Notification.show({
                            html: '保存成功',
                            title: '提示'
                        });
                    }
                    else if (data == -2)
                    {
                        App.taskDetailMain.close();
                        Ext.net.Notification.show({
                            html: '你不是这家店铺的陈列师不可以进行反馈',
                            title: '提示'
                        });
                    }
                    else if (data == -3) {
                        Ext.net.Notification.show({
                            html: '保存问题图片失败',
                            title: '提示'
                        });
                    }
                    else if (data == -4) {
                        Ext.net.Notification.show({
                            html: '反馈描述不能为空',
                            title: '提示'
                        });
                    }
                    else {
                        Ext.net.Notification.show({
                            html: '保存失败',
                            title: '提示'
                        });
                    }
                }
            });
        };

        var btnTabPage = function ()
        {
            //console.log(App.TabPanel1);
            //console.log(App.TabPanel1.activeTab.id);
            if (App.TabPanel1.activeTab.id == 'Panel2')
            {
                CompanyX.TabPageChange("");
            }
        }

        function ExecWeek(num)
        {
            var ExecWeek_Text = '';
            switch(num)
            {
                case 1:
                    ExecWeek_Text = '星期一';
                    break;
                case 2:
                    ExecWeek_Text = '星期二';
                    break;
                case 3:
                    ExecWeek_Text = '星期三';
                    break;
                case 4:
                    ExecWeek_Text = '星期四';
                    break;
                case 5:
                    ExecWeek_Text = '星期五';
                    break;
                case 6:
                    ExecWeek_Text = '星期六';
                    break;
                default:
                    ExecWeek_Text = '星期天';
            }
            return ExecWeek_Text;
        }
        function TaskType(num)
        {
            var TaskType_text = '';
            switch (num) {
                case 1:
                    TaskType_text = '门头全景';
                    break;
                case 2:
                    TaskType_text = '橱窗及模特阵';
                    break;
                case 3:
                    TaskType_text = '推台';
                    break;
                case 4:
                    TaskType_text = '休闲背墙';
                    break;
                case 5:
                    TaskType_text = '精英背墙';
                    break;
                case 6:
                    TaskType_text = '创意背墙';
                    break;
                case 7:
                    TaskType_text = '潮系列背墙';
                    break;
                case 8:
                    TaskType_text = '配件墙';
                    break;
                case 9:
                    TaskType_text = 'A斗,篮架,配件斗,综合中岛';
                    break;
                case 10:
                    TaskType_text = '龙门架';
                    break;
                case 11:
                    TaskType_text = '鞋区';
                    break;
                case 12:
                    TaskType_text = '收银台';
                    break;
                case 13:
                    TaskType_text = '试衣间';
                    break;
                case 14:
                    TaskType_text = '裤区';
                    break;
                case 15:
                    TaskType_text = '形象画';
                    break;
                case 16:
                    TaskType_text = '员工合照';
                    break;
                default:
                    TaskType_text = '其他';
            }
            return TaskType_text;
        }
        function IsEnabled(bol)
        {
            var IsEnabled_text = '否';
            if (bol == true)
            {
                IsEnabled_text = '是'
            }
            return IsEnabled_text;
        }
        function TaskFinishLevel(num) {
            $(".cylstar").raty({
                path: '../js/plugins/jquery.raty/images/',
                score: function () {
                    return $(this).attr("data-num");
                },
                starHalf: 'star-half-big.png',
                starOff: 'star-off-big.png',
                starOn: 'star-on-big.png',
                half: true
            });
            $('.cylstar').raty('score', num);
        }
        function ImageMax()
        {
            $(".ImageMax").viewer();
        }

    </script>


</head>
<body>
    <form id="form1" runat="server">
        <div>
            <ext:ResourceManager ID="ResourceManager1" runat="server" Theme="Neptune" />
            <ext:Viewport ID="Viewport1" runat="server">
                <LayoutConfig>
                    <ext:HBoxLayoutConfig Align="Stretch" />
                </LayoutConfig>
                <Defaults>
                    <ext:Parameter Name="margin" Value="2 0" Mode="Value" />
                </Defaults>
                <Items>
                    <ext:TabPanel ID="TabPanel1" runat="server" Flex="1">
                        <TopBar>
                            <ext:Toolbar ID="Toolbar1" runat="server" Layout="ColumnLayout">
                                <Items>
                                    <ext:ComboBox runat="server" ID="txtBigAreaName" DisplayField="BigAreaName" QueryMode="Local" TypeAhead="true" ValueField="BigAreaName" Width="200" FieldLabel="省份" LabelWidth="60">
                                        <Store>
                                            <ext:Store ID="Store_BigAreaName" runat="server" AutoDataBind="true">
                                                <Model>
                                                    <ext:Model ID="Model6" runat="server">
                                                        <Fields>
                                                            <ext:ModelField Name="BigAreaName" />
                                                        </Fields>
                                                    </ext:Model>
                                                </Model>
                                            </ext:Store>
                                        </Store>
                                        <DirectEvents>
                                            <Change OnEvent="GetArea" />
                                        </DirectEvents>
                                    </ext:ComboBox>
                                    <ext:ComboBox runat="server" ID="txtAreaName" DisplayField="AreaName" QueryMode="Local" TypeAhead="true" ValueField="AreaName" Width="200" FieldLabel="城市" LabelWidth="60">
                                        <Store>
                                            <ext:Store ID="Store_AreaName" runat="server" AutoDataBind="true">
                                                <Model>
                                                    <ext:Model ID="Model7" runat="server">
                                                        <Fields>
                                                            <ext:ModelField Name="AreaName" />
                                                        </Fields>
                                                    </ext:Model>
                                                </Model>
                                            </ext:Store>
                                        </Store>
                                    </ext:ComboBox>
                                    <ext:TextField runat="server" ID="txtShopName" FieldLabel="店铺简称" LabelWidth="60" EmptyText="输入店铺简称" />
                                    <ext:ComboBox runat="server" ID="cboTaskType" FieldLabel="任务类型" LabelWidth="60" Width="200">
                                        <Items>
                                            <ext:ListItem Text="门头全景" Value="1" />
                                            <ext:ListItem Text="橱窗及模特阵" Value="2" />
                                            <ext:ListItem Text="推台" Value="3" />
                                            <ext:ListItem Text="休闲背墙" Value="4" />
                                            <ext:ListItem Text="精英背墙" Value="5" />
                                            <ext:ListItem Text="创意背墙" Value="6" />
                                            <ext:ListItem Text="潮系列背墙" Value="7" />
                                            <ext:ListItem Text="配件墙" Value="8" />
                                            <ext:ListItem Text="A斗,篮架,配件斗,综合中岛" Value="9" />
                                            <ext:ListItem Text="龙门架" Value="10" />
                                            <ext:ListItem Text="鞋区" Value="11" />
                                            <ext:ListItem Text="收银台" Value="12" />
                                            <ext:ListItem Text="试衣间" Value="13" />
                                            <ext:ListItem Text="裤区" Value="14" />
                                            <ext:ListItem Text="形象画" Value="15" />
                                            <ext:ListItem Text="员工合照" Value="16" />
                                            <ext:ListItem Text="其他" Value="17" />
                                        </Items>
                                    </ext:ComboBox>
                                    <ext:DateField runat="server" ID="txtProcessingTimeBegin" LabelWidth="60" Editable="false" FieldLabel="开始时间" Width="180">
                                        <DirectEvents>
                                            <Change OnEvent="StartDateField" />
                                        </DirectEvents>
                                    </ext:DateField>
                                    <ext:DateField runat="server" ID="txtProcessingTimeEnd" LabelWidth="60" Editable="false" FieldLabel="结束时间" Width="180" />

                                </Items>
                            </ext:Toolbar>
                        </TopBar>
                        
                        <Items>
                            <ext:GridPanel ID="GridPanel1" runat="server" Title="文本列表" TitleAlign="Right" Height="500" Icon="Find">
                                <TopBar>
                                    <ext:Toolbar runat="server">
                                        <Items>
                                            <ext:Label ID="Label7" runat="server" Text="操作提示：可切换图文列表查看已完成任务数据。" StyleSpec="color:red;" />
                                        </Items>
                                    </ext:Toolbar>
                                </TopBar>
                                <Store>
                                    <ext:Store ID="Store1" runat="server" PageSize="40" OnReadData="RefreshDataSet">
                                        <Model>
                                            <ext:Model ID="Model1" runat="server" IDProperty="美人计店铺编号">
                                                <Fields>
                                                    <ext:ModelField Name="ShopName" />
                                                    <ext:ModelField Name="ShopID" />
                                                    <ext:ModelField Name="ZoneAddress" />
                                                    <ext:ModelField Name="TaskName" />
                                                    <ext:ModelField Name="ProcessingDescribe" />
                                                    <ext:ModelField Name="ProcessingTime" />
                                                    <ext:ModelField Name="TaskID" />
                                                    <ext:ModelField Name="DetailID" />
                                                </Fields>
                                            </ext:Model>
                                        </Model>
                                    </ext:Store>
                                </Store>
                                <ColumnModel>
                                    <Columns>
                                        <ext:RowNumbererColumn ID="RowNumbererColumn1" runat="server" />
                                        <ext:Column ID="Column1" runat="server" Text="店铺名称" DataIndex="ShopName" Width="180" />
                                        <ext:Column ID="Column2" runat="server" Text="店铺代码" DataIndex="ShopID" Width="100" />
                                        <ext:Column ID="Column3" runat="server" Text="省/市" DataIndex="ZoneAddress" Width="120" />
                                        <ext:Column ID="Column4" runat="server" Text="任务名称" DataIndex="TaskName" Width="116" />
                                        <%--<ext:TemplateColumn ID="Column4" runat="server" Text="任务名称" DataIndex="TaskName" Width="200" TemplateString='<a href="../ShopTask/TaskSet.aspx?TaskID={TaskID}" >{TaskName}</a>' />--%>
                                        <ext:Column ID="Column5" runat="server" Text="描述" DataIndex="ProcessingDescribe" Width="360" />
                                        <ext:Column ID="Column7" runat="server" Text="最近完成时间" DataIndex="ProcessingTime" Width="150" />
                                        <ext:TemplateColumn ID="Column8" runat="server" Text="操作" DataIndex="TaskID" TemplateString='<a href=# class="{DetailID}" onclick=btnTaskDetail_Click("{TaskID}","{DetailID}","{ShopID}")>详细</a>' />
                                    </Columns>
                                </ColumnModel>

                                <BottomBar>
                                    <ext:PagingToolbar ID="PagingToolbar1" runat="server">
                                        <Items>
                                            <ext:Label ID="Label1" runat="server" Text="每页显示:" />
                                            <ext:ToolbarSpacer ID="ToolbarSpacer1" runat="server" Width="10" />
                                            <ext:ComboBox ID="ComboBox1" runat="server" Width="80">
                                                <Items>
                                                    <ext:ListItem Text="40" />
                                                </Items>
                                                <SelectedItems>
                                                    <ext:ListItem Value="40" />
                                                </SelectedItems>
                                                <Listeners>
                                                    <Select Handler="#{GridPanel1}.store.pageSize = parseInt(this.getValue(), 10); #{GridPanel1}.store.reload();" />
                                                </Listeners>
                                            </ext:ComboBox>
                                            <ext:Button ID="Button1" runat="server" Text="查询" Width="70" OnDirectClick="BtnQureyUser" UI="Info" Icon="Find">
                                                <DirectEvents>
                                                    <Click Timeout="300000">
                                                        <EventMask ShowMask="true" Msg="加载中..."></EventMask>
                                                    </Click>
                                                </DirectEvents>
                                            </ext:Button>
                                        </Items>
                                        <Plugins>
                                            <ext:ProgressBarPager ID="ProgressBarPager1" runat="server" />
                                        </Plugins>
                                    </ext:PagingToolbar>
                                </BottomBar>
                            </ext:GridPanel>

                            <ext:Panel ID="Panel2" runat="server" Cls="images-view" Layout="FitLayout" Title="图文列表" TitleAlign="Right" Height="500" Icon="Find">
                                <TopBar>
                                    <ext:Toolbar runat="server">
                                        <Items>
                                            <ext:Label runat="server" Text="操作提示：" StyleSpec="color:red;" />
                                            <ext:Button ID="btnCheckAll" runat="server" Text="全选" UI="Info">
                                                <Listeners>
                                                    <Click Handler="btnCheckAll_Click()" />
                                                </Listeners>
                                            </ext:Button>
                                            <ext:Button ID="btnCheckCancel" runat="server" Text="取消" UI="Info">
                                                <Listeners>
                                                    <Click Handler="btnCheckCancel_Click()" />
                                                </Listeners>
                                            </ext:Button>
                                            <ext:Button ID="btnEdit" runat="server" Text="反馈" UI="Info">
                                                <Listeners>
                                                    <Click Handler="btnBatchEdit_Click()" />
                                                </Listeners>
                                            </ext:Button>
                                        </Items>
                                    </ext:Toolbar>
                                </TopBar>
                                
                                <Items>
                                    <ext:DataView ID="ImageView" runat="server" SimpleSelect="false" MultiSelect="true" OverItemCls="x-item-over" TrackOver="true" ItemSelector="div.albums_item_box" AutoScroll="true">
                                        <Store>
                                            <ext:Store ID="Store3" runat="server" PageSize="40" OnReadData="RefreshDataSetView">
                                                <Model>
                                                    <ext:Model ID="Model3" runat="server" IDProperty="mrjShopDataID">
                                                        <Fields>
                                                            <ext:ModelField Name="ShopName" />
                                                            <ext:ModelField Name="ShopID" />
                                                            <ext:ModelField Name="ZoneAddress" />
                                                            <ext:ModelField Name="TaskName" />
                                                            <ext:ModelField Name="ProcessingDescribe" />
                                                            <ext:ModelField Name="ProcessingTime" />
                                                            <ext:ModelField Name="TaskID" />
                                                            <ext:ModelField Name="DetailID" />
                                                            <ext:ModelField Name="Url" />
                                                            <ext:ModelField Name="IsInsert" />
                                                            <ext:ModelField Name="IsRead" />
                                                        </Fields>
                                                    </ext:Model>
                                                </Model>
                                            </ext:Store>
                                        </Store>
                                        <Tpl runat="server">
                                            <Html>
                                                <div id="albums_item_list" class="clearfix" style="display: block">
                                                <div class="viewer_box clearfix">
                                                    <tpl for=".">
                                                        
                                                        <div class="albums_item_box" onclick="selectionClick('{mrjShopDataID}','{ShopID}{TaskID}{DetailID}')">
                                                            <div class="file-panel"><span id="{ShopID}{TaskID}{DetailID}" class="false_span" data-resourceid="{mrjShopDataID}">选择</span></div>
                                                            <div class="img_box">
                                                                <img class="lazy img-responsive" src="{Url}" data-original="{Url}" />
                                                                <span id="" class="finishround feedback-state-{IsInsert}" style="color: red;border: 1px solid red;">
                                                                    已反馈
                                                                </span>
                                                            </div>
                                                            <div class="row albums_item_des">
                                                                <div class="col-xs-10">{ShopName}-{TaskName}</div>
                                                                <div class="col-xs-2"><a href=# onclick="btnTaskDetail_Click('{TaskID}','{DetailID}','{ShopID}')">详细</a></div>
                                                            </div>
                                                        </div>

                                                    </tpl>
                                                </div>
                                                </div>

                                            </Html>
                                        </Tpl>
                                        <%--<Listeners>
                                            <SelectionChange Fn="selectionChanged" />
                                        </Listeners>--%>
                                        <Listeners>
                                            <BeforeRefresh Fn="btnPagClick" />
                                        </Listeners>
                                    </ext:DataView >

                                </Items>
                                <BottomBar>
                                    <ext:PagingToolbar ID="PagingToolbar2" StoreID="Store3" runat="server">
                                        <Items>
                                            <ext:Label ID="Label5" runat="server" Text="每页显示:" />
                                            <ext:ToolbarSpacer ID="ToolbarSpacer2" runat="server" Width="10" />
                                            <ext:ComboBox ID="ComboBox2" runat="server" Width="80">
                                                <Items>
                                                    <ext:ListItem Text="40" />
                                                </Items>
                                                <SelectedItems>
                                                    <ext:ListItem Value="40" />
                                                </SelectedItems>
                                            </ext:ComboBox>
                                            <ext:Button ID="Button2" runat="server" Text="查询" Width="70" OnDirectClick="BtnQureyUserView" UI="Info" Icon="Find">
                                                <DirectEvents>
                                                    <Click Timeout="300000">
                                                        <EventMask ShowMask="true" Msg="加载中..."></EventMask>
                                                    </Click>
                                                </DirectEvents>
                                            </ext:Button>
                                        </Items>
                                        <Plugins>
                                            <ext:ProgressBarPager ID="ProgressBarPager2" runat="server" />
                                        </Plugins>
                                    </ext:PagingToolbar>
                                </BottomBar>
                            </ext:Panel>
                            
                        </Items>
                        <Listeners>
                            <TabChange Handler="btnTabPage();" />
                        </Listeners>
                    </ext:TabPanel>
                </Items>
            </ext:Viewport>

            <ext:Window runat="server" ID="winMain" Icon="DatabaseAdd" Hidden="true" Constrain="true" MinHeight="500" MaxHeight="500" MinWidth="820" Modal="true" CloseAction="Hide" BodyPaddingSummary="10" Layout="FitLayout">
                <Buttons>
                    <ext:Button runat="server" ID="btnTaskBatchSave" Text="保存" Icon="Disk">
                        <Listeners>
                            <Click Handler="btnTaskBatchSave_Click();" />
                        </Listeners>
                    </ext:Button>
                    <ext:Button runat="server" ID="btnMainCancel" Text="取消" Icon="Cancel">
                        <Listeners>
                            <Click Handler="btnClose_Click();" />
                        </Listeners>
                    </ext:Button>
                </Buttons>
                <Items>
                    <ext:FormPanel runat="server" AutoScroll="true" ID="frmMain" Layout="VBoxLayout">
                        <FieldDefaults LabelAlign="Left" LabelWidth="60" MsgTarget="Side" />
                        <Plugins>
                            <ext:DataTip ID="DataTip1" runat="server" />
                        </Plugins>
                        <LayoutConfig>
                            <ext:VBoxLayoutConfig Align="Stretch" />
                        </LayoutConfig>
                        <Items>
                            <ext:FieldContainer ID="FieldContainer11" runat="server" Layout="HBoxLayout">
                                <Items>
                                    <ext:DataView ID="DataView7" runat="server" ItemSelector="div.albums_item_des" Width="260">
                                        
                                        <Tpl ID="Tpl3" runat="server">
                                            <Html>
                                                <div class="row albums_item_des">
                                                    <div class="col-xs-4">反馈评价:</div>
                                                    <div id="cylstar1" class="col-xs-8 cylstar" data-num="0"></div>
                                                </div>
                                            </Html>
                                        </Tpl>
                                    </ext:DataView >
                                </Items>
                            </ext:FieldContainer>
                            <ext:FieldContainer ID="FieldContainer12" runat="server" Layout="HBoxLayout">
                                <Items>
                                    <ext:HtmlEditor ID="txtFeedBackDescribe1" runat="server" Width="766" Height="200" EnableAlignments="false" EnableFontSize="false" CreateLinkText="创建的链接文本">
                                        <ButtonTips>
                                            <BackColor Text="My BackColor Tip" />
                                            <Bold Text="My Bold Tip" />
                                        </ButtonTips>
                                    </ext:HtmlEditor>
                                    
                                </Items>
                            </ext:FieldContainer>
                            <ext:FieldContainer ID="FieldContainer13" runat="server" Layout="HBoxLayout">
                                <Items>
                                    <ext:DataView ID="DataView8" runat="server" ItemSelector="div.albums_item_des" Width="260">
                                        
                                        <Tpl ID="Tpl4" runat="server">
                                            <Html>
                                                <div class="row albums_item_des">
                                                    <div class="col-xs-4">处理列表:</div>
                                                    <div class="col-xs-8"></div>
                                                </div>
                                            </Html>
                                        </Tpl>
                                    </ext:DataView >
                                </Items>
                            </ext:FieldContainer>
                            <ext:GridPanel ID="GridPanelBatch" runat="server">
                                <Store>
                                    <ext:Store runat="server">
                                        <Model>
                                            <ext:Model runat="server" IDProperty="批处理列表">
                                                <Fields>
                                                    <ext:ModelField Name="Custom_Id" />
                                                    <ext:ModelField Name="ShopName" />
                                                    <ext:ModelField Name="ShopID" />
                                                    <ext:ModelField Name="TaskName" />
                                                    <ext:ModelField Name="ProcessingDescribe" />
                                                    <ext:ModelField Name="TaskID" />
                                                    <ext:ModelField Name="DetailID" />
                                                    <ext:ModelField Name="Url" />
                                                </Fields>
                                            </ext:Model>
                                        </Model>
                                    </ext:Store>
                                </Store>
                                <ColumnModel>
                                    <Columns>
                                        <ext:RowNumbererColumn ID="RowNumbererColumn2" runat="server" />
                                        <ext:TemplateColumn ID="BatchColumn1" runat="server" Text="图片" DataIndex="Url" Width="60" TemplateString='<img src="{Url}" alt="{ShopName}" width="40" height="40" data-original="{Url}" />' />
                                        <ext:Column ID="BatchColumn2" runat="server" Text="店铺名称" DataIndex="ShopName" Width="200" />
                                        <ext:Column ID="BatchColumn3" runat="server" Text="任务名称" DataIndex="TaskName" Width="100" />
                                        <ext:Column ID="BatchColumn4" runat="server" Text="描述" DataIndex="ProcessingDescribe" Width="260" />
                                        <ext:TemplateColumn ID="BatchColumn5" runat="server" Text="操作" DataIndex="TaskID" TemplateString='<a href=# class="{DetailID}" onclick=removeGridPanelBatch({Custom_Id})>移除</a>' />
                                    </Columns>
                                </ColumnModel>
                            </ext:GridPanel>
                        
                        </Items>
                    </ext:FormPanel>
                </Items>
            </ext:Window>
            
            <ext:Window runat="server" ID="taskDetailMain" Icon="DatabaseAdd" Hidden="true" Constrain="true" MinHeight="500" MaxHeight="600" MinWidth="660" Modal="true" CloseAction="Hide" BodyPaddingSummary="10" Layout="FitLayout">
                <Buttons>
                    <ext:Button runat="server" ID="btnTaskDetailSave" Text="保存" Icon="Disk">
                        <Listeners>
                            <Click Handler="btnTaskDetailSave_Click();" />
                        </Listeners>
                    </ext:Button>
                    <ext:Button runat="server" ID="btnTaskDetailCancel" Text="取消" Icon="Cancel">
                        <Listeners>
                            <Click Handler="#{taskDetailMain}.close();" />
                        </Listeners>
                    </ext:Button>
                </Buttons>
                <Items>
                    <ext:FormPanel runat="server" AutoScroll="true" ID="frmTaskDetail" Layout="VBoxLayout">
                        <FieldDefaults LabelAlign="Left" LabelWidth="60" MsgTarget="Side" />
                        <Plugins>
                            <ext:DataTip ID="DataTip2" runat="server" />
                        </Plugins>
                        <LayoutConfig>
                            <ext:VBoxLayoutConfig Align="Stretch" />
                        </LayoutConfig>
                        <Items>
                            <ext:FieldContainer ID="FieldContainer1" runat="server" Layout="HBoxLayout">
                                <Items>
                                    <ext:Label ID="Label2" runat="server" Text="任务明细"></ext:Label>
                                </Items>
                            </ext:FieldContainer>
                            <ext:FieldContainer ID="FieldContainer2" runat="server" Layout="HBoxLayout">
                                <Items>
                                    <ext:DataView ID="DataView4" runat="server" ItemSelector="div.cyl1" Width="640">
                                        <Tpl runat="server">
                                            <Html>
                                                <div class="cyl1">
                                                    <div class="row">
                                                        <div class="col-xs-2">任务名称:</div>
                                                        <div class="col-xs-4" id="txtTaskName"></div>
                                                        <div class="col-xs-2">执行时间:</div>
                                                        <div class="col-xs-4" id="txtExecWeek"></div>
                                                    </div>
                                                </div>
                                            </Html>
                                        </Tpl>
                                    </ext:DataView >
                                </Items>
                            </ext:FieldContainer>
                            <ext:FieldContainer ID="FieldContainer3" runat="server" Layout="HBoxLayout">
                                <Items>
                                    <ext:DataView ID="DataView5" runat="server" ItemSelector="div.cyl1" Width="640">
                                        <Tpl runat="server">
                                            <Html>
                                                <div class="cyl1">
                                                    <div class="row">
                                                        <div class="col-xs-2">任务类型:</div>
                                                        <div class="col-xs-4" id="txtTaskType"></div>
                                                        <div class="col-xs-2">是否启用:</div>
                                                        <div class="col-xs-4" id="txtIsEnabled"></div>
                                                    </div>
                                                </div>
                                            </Html>
                                        </Tpl>
                                    </ext:DataView >
                                </Items>
                            </ext:FieldContainer>
                            <ext:FieldContainer ID="FieldContainer4" runat="server" Layout="VBoxLayout">
                                <Items>
                                    <ext:DataView ID="DataView6" runat="server" ItemSelector="div.cyl1" Width="640">
                                        <Tpl runat="server">
                                            <Html>
                                                <div class="cyl1">
                                                    <div class="row">
                                                        <div class="col-xs-2">任务描述:</div>
                                                        <div class="col-xs-10"><p id="txtTaskDescribe"></p></div>
                                                    </div>
                                                </div>
                                            </Html>
                                        </Tpl>
                                    </ext:DataView >
                                </Items>
                            </ext:FieldContainer>
                            <ext:FieldContainer ID="FieldContainer5" runat="server" Layout="HBoxLayout">
                                <Items>
                                    <ext:Label ID="Label3" runat="server" Text="任务完成明细"></ext:Label>
                                </Items>
                            </ext:FieldContainer>
                            <ext:FieldContainer ID="FieldContainer7" runat="server" Layout="VBoxLayout">
                                <Items>
                                    <ext:DataView ID="DataView3" runat="server" ItemSelector="div.cyl1" Width="640">
                                        <Tpl runat="server">
                                            <Html>
                                                <div class="cyl1">
                                                    <div class="row">
                                                        <div class="col-xs-2">完成时间:</div>
                                                        <div class="col-xs-10" id="txtProcessingTime1"></div>
                                                    </div>
                                                    <div class="row" style="margin-top:4px;">
                                                        <div class="col-xs-2">备注描述:</div>
                                                        <div class="col-xs-10"><p id="txtProcessingDescribe"></p></div>
                                                    </div>
                                                </div>
                                            </Html>
                                        </Tpl>
                                    </ext:DataView >
                                </Items>
                            </ext:FieldContainer>

                            <ext:FieldContainer ID="FieldContainer6" runat="server" Layout="HBoxLayout" Height="280">
                                <Items>
                                    <ext:DataView ID="DataView1" runat="server" ItemSelector="div.myCarousel" Height="276" Weight="640">
                                        <Store>
                                            <ext:Store ID="Store2" runat="server">
                                                <Model>
                                                    <ext:Model ID="Model2" runat="server">
                                                        <Fields>
                                                            <ext:ModelField Name="ImgID" />
                                                            <ext:ModelField Name="Title" />
                                                            <ext:ModelField Name="Url" />
                                                            <ext:ModelField Name="RowIndex" />
                                                            <ext:ModelField Name="Active" />
                                                        </Fields>
                                                    </ext:Model>
                                                </Model>
                                            </ext:Store>
                                        </Store>
                                        <Tpl ID="Tpl1" runat="server">
                                            <Html>
                                                <div id="myCarousel" class="carousel slide myCarousel" style="Height:276px;">
                                                    <ol class="carousel-indicators">
                                                        <tpl for=".">
                                                            <li data-target="#myCarousel" data-slide-to="{RowIndex}" class="{Active}"></li>
                                                        </tpl>
                                                    </ol>
                                                    <div class="carousel-inner ImageMax">
                                                        <tpl for=".">
                                                        
                                                            <div class="item {Active}" style="width: 636px; height:276px; position: relative;">

                                                                <%--<img src="../images/nopic.png" alt="{Title}" width="636" height="270" />--%>
                                                                <img src="{Url}" alt="{Title}" style="width: auto; height:276px !important; left: 50%;position: absolute;transform: translate(-50%, -0%);"  />
                                                                
                                                            </div>
                                                    
                                                        </tpl>
                                                    </div>
                                                    <a class="carousel-control left" href="#myCarousel" data-slide="prev">&lsaquo;</a>
                                                    <a class="carousel-control right" href="#myCarousel" data-slide="next">&rsaquo;</a>
                                                </div>
                                            
                                            </Html>
                                        </Tpl>
                                    </ext:DataView >

                                </Items>
                            </ext:FieldContainer>
                            <ext:FieldContainer ID="FieldContainer8" runat="server" Layout="HBoxLayout">
                                <Items>
                                    <ext:Label ID="Label4" runat="server" Text="反馈建议"></ext:Label>
                                </Items>
                            </ext:FieldContainer>

                            <ext:FieldContainer ID="FieldContainer9" runat="server" Layout="HBoxLayout">
                                <Items>
                                    <ext:DataView ID="DataView2" runat="server" ItemSelector="div.albums_item_des" Width="260">
                                        
                                        <Tpl ID="Tpl2" runat="server">
                                            <Html>
                                                <div class="row albums_item_des">
                                                    <div class="col-xs-4">反 馈 评 价:</div>
                                                    <div id="cylstar2" class="col-xs-8 cylstar" data-num="0"></div>
                                                </div>
                                            </Html>
                                        </Tpl>
                                    </ext:DataView >
                                </Items>
                            </ext:FieldContainer>

                            <ext:FieldContainer ID="FieldContainer14" runat="server" Layout="HBoxLayout">
                                <Items>
                                    <ext:DataView ID="DataView9" runat="server" SimpleSelect="false" MultiSelect="true" OverItemCls="x-item-over" TrackOver="true" ItemSelector="div.albums_item_box1" AutoScroll="true">
                                        <Store>
                                            <ext:Store ID="Store4" runat="server" PageSize="40" OnReadData="RefreshDataSetView">
                                                <Model>
                                                    <ext:Model ID="Model4" runat="server" IDProperty="mrjShopDataID">
                                                        <Fields>
                                                            <ext:ModelField Name="ImgID" />
                                                            <ext:ModelField Name="Title" />
                                                            <ext:ModelField Name="Url" />
                                                            <ext:ModelField Name="RowIndex" />
                                                            <ext:ModelField Name="Active" />
                                                        </Fields>
                                                    </ext:Model>
                                                </Model>
                                            </ext:Store>
                                        </Store>
                                        <Tpl runat="server">
                                            <Html>
                                                <div>
                                                    <table>
                                                        <tr>
                                                            <td>选择问题图片:</td>
                                                            <td>
                                                                <div id="albums_item_list" class="clearfix" style="display: block">
                                                                    <div class="viewer_box clearfix">
                                                                        <tpl for=".">
                                                                            <div class="albums_item_box1" onclick="SelectProblemPicClick('{ImgID}','{ImgID}')">
                                                                                <div class="file-panel"><span id="{ImgID}" class="false_span" data-resourceid="{ImgID}">选择</span></div>
                                                                                <div class="img_box1">
                                                                                    <img class="lazy img-responsive" src="{Url}" data-original="{Url}" />
                                                                                </div>
                                                                            </div>
                                                                        </tpl>
                                                                    </div>
                                                                </div>

                                                            </td>
                                                        </tr>
                                                    </table>
                                                </div>

                                            </Html>
                                        </Tpl>

                                        <Listeners>
                                            <BeforeRefresh Fn="btnPagClick" />
                                        </Listeners>
                                    </ext:DataView >
                                </Items>
                            </ext:FieldContainer>

                            <ext:FieldContainer ID="FieldContainer10" runat="server" Layout="HBoxLayout">
                                <Items>
                                    <ext:HtmlEditor ID="txtFeedBackDescribe" runat="server" Width="610" Height="200" EnableAlignments="false" EnableFontSize="false" CreateLinkText="创建的链接文本">
                                        <ButtonTips>
                                            <BackColor Text="My BackColor Tip" />
                                            <Bold Text="My Bold Tip" />
                                        </ButtonTips>
                                    </ext:HtmlEditor>
                                    
                                </Items>
                            </ext:FieldContainer>

                        </Items>
                    </ext:FormPanel>
                </Items>
            </ext:Window> 

        </div>
    </form>
</body>
</html>
